function tochinese(day) {
	switch (day) {
	case 0:
		return '日';
	case 1:
		return '一';
	case 2:
		return '二';
	case 3:
		return '三';
	case 4:
		return '四';
	case 5:
		return '五';
	case 6:
		return '六';

	}

};
window.onload = function() {
	// 收藏本站
	var shoucang = document.getElementById('shoucang');
	shoucang.onclick = function() {
		if (document.all) {
			window.external.addFavorite('http://www.360house.com.cn', '收藏夹');
		} else if (window.sidebar) {
			window.sidebar.addPanel('中国幸福社区网', 'http://www.360houese.com.cn',
					"");
		}
	}
	// 时间
	var owc = document.getElementById('welcome');
	var odate = new Date();
	str = '欢迎来到<span>中国幸福社区</span>,今天是<span>' + odate.getFullYear()
			+ '</span>年<span>' + (odate.getMonth() + 1) + '</span>月<span>'
			+ odate.getDate() + '</span>日,' + ' 星期<span>'
			+ tochinese(odate.getDay()) + '</span>';
	owc.innerHTML = str;
	// alert(str);
	// IE6 png图片的兼容性问题
	DD_belatedPNG.fix('div,ul,img,li,input,a');

};

jQuery(document)
		.ready(
				function() {

					// 用户名
					jQuery('#username')
							.blur(
									function() {
										var username = jQuery(this).val();
										if (username == '') {
											var errorMsg = '请填写您的邮箱';
											jQuery('#judge_email').html(
													'<img src="/images/false.png" />'
															+ errorMsg);
										} else if (username != ""
												&& !/^\w(\w*\.*)*@(\w+\.)+\w{2,4}$/.test(username)) {
											var errorMsg = '您的邮箱格式不对';
											jQuery('#judge_email').html(
													'<img src="/images/false.png" />'
															+ errorMsg);
										} else {
											jQuery('#judge_email')
													.html('<img src="/images/ture.png" />');
										}
									});
					// 密码
					jQuery('#pwd').blur(
							function() {
								var pwd = jQuery(this).val();
								if (pwd == '') {
									var errorMsg = '请输入您的密码';
									jQuery('#judge_pwd').html(
											'<img src="/images/false.png" />'
													+ errorMsg);
								} else if (pwd.length < 6) {
									var errorMsg = '密码长度不能小于6位';
									jQuery('#judge_pwd').html(
											'<img src="/images/false.png" />'
													+ errorMsg);
								} else {
									jQuery('#judge_pwd').html(
											'<img src="/images/ture.png" />');
								}
							});
					
					
				});